package com.ruoyi.project.wms.factory;

import com.ruoyi.common.utils.spring.SpringUtils;
import com.ruoyi.common.zx.PageData;
import com.ruoyi.project.wms.mapper.WmsGoodsStockMapper;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

import java.util.TimerTask;

/**
 * @author: Qbzzz
 * @version: 1.0
 * @description:
 * @create: 2023/6/12 11:27
 */
public class AsyncLogInfo  {
    public static TimerTask recordLog(PageData a) {
        return new TimerTask() {
            @Override
            public void run() {
                SpringUtils.getBean(WmsGoodsStockMapper.class).insertStockLog(a);
            }
        };
    }
}
